// highlight.js  代码高亮指令
import Hljs from 'highlight.js';
export default defineNuxtPlugin(async NuxtApp=>{
    console.log("defineNuxtPlugin 我被加载了。");
    NuxtApp.vueApp.directive("highlight",(el)=>{
        const blocks = document.querySelectorAll("pre code");

        blocks.forEach(block=>{
            Hljs.highlightBlock(block)
        })
    })
})
